Skip to content

Conversation

J-Sek
Copy link
Contributor

@J-Sek J-Sek commented Sep 29, 2025

Description

  • introduces grouping to enable fully localized format

TODO:

  • replace Persian and Bengali numerals back to [0..9] digits
  • apply format while typing, pasting, cutting, etc. (maintain cursor position)
  • prevent removing single grouping character

Markup:

<template>
  <v-app theme="dark">
    <v-container>
      <v-row>
        <v-col>
          <h5>(grouping="min2")</h5>
          <v-number-input v-model="example1" :precision="0" grouping="min2" hide-details="auto" />
          <code class="d-block pt-3">value: {{ example1 }}</code>
        </v-col>
      </v-row>
      <v-row>
        <v-col>
          <h5>(group-separator=" " grouping)</h5>
          <v-number-input v-model="example2" :precision="2" group-separator=" " hide-details="auto" grouping />
          <code class="d-block pt-3">value: {{ example2 }}</code>
        </v-col>
        <v-col>
          <h5>(locale="de")</h5>
          <v-locale-provider locale="de">
            <v-number-input v-model="example3" :precision="2" hide-details="auto" grouping />
          </v-locale-provider>
          <code class="d-block pt-3">value: {{ example3 }}</code>
        </v-col>
        <v-col>
          <h5>(precision unrestricted)</h5>
          <v-number-input v-model="example4" :precision="null" hide-details="auto" grouping />
          <code class="d-block pt-3">value: {{ example4 }}</code>
        </v-col>
      </v-row>
    </v-container>
  </v-app>
</template>

<script setup>
  import { ref } from 'vue'

  const example1 = ref(4052)
  const example2 = ref(12300000)
  const example3 = ref(200021025.5)
  const example4 = ref(0.052)
</script>

@J-Sek J-Sek self-assigned this Sep 29, 2025
@J-Sek J-Sek force-pushed the feat/vnumberinput-grouping branch from 140d2c6 to 6bb6002 Compare September 29, 2025 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant